package com.example.app21_animation_demo;

import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;

import androidx.activity.EdgeToEdge;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.graphics.Insets;
import androidx.core.view.ViewCompat;
import androidx.core.view.WindowInsetsCompat;

public class SetupGuide3Activity extends AppCompatActivity {

    private static final String TAG = "SetupGuide3Activity";

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        EdgeToEdge.enable(this);
        setContentView(R.layout.activity_setup_guide3);
        ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main), (v, insets) -> {
            Insets systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars());
            v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom);
            return insets;
        });

        Log.i(TAG, "onCreate");
    }

    /**
     * 上一步按钮点击事件
     * @param view 发生事件的视图对象
     */
    public void prov(View view) {
        finish();
        overridePendingTransition(R.anim.translate_left_in, R.anim.translate_right_out);
    }

    /**
     * 下一步按钮点击事件
     * @param view 发生事件的视图对象
     */
    public void next(View view) {
        startActivity(new Intent(this, MainActivity.class));
        overridePendingTransition(R.anim.translate_bottom_in, R.anim.alpha_disappear_out);
    }
}